#include<iostream>
#include<signal.h>

void handler(int signalnum){
    std::cout<<"this is a signal for ctrl+c"<<std::endl;
}

int main(){
    signal(2,handler);
    while(true){
        //
    }

    return 0;
}